// Copyright 2020 Real-Time Innovations, Inc. (RTI)
//
// Copyleft 2024, Black Sesame Technologies
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef DAL_CONNEXTDDS__DAL_IMPL_HPP_
#define DAL_CONNEXTDDS__DAL_IMPL_HPP_

#include <string>
#include <vector>
#include <map>
#include <mutex>
#include <condition_variable>
#include <atomic>

#include "dal_connextdds/type_support.hpp"

#include "dcutils/types/uint8_array.h"

/******************************************************************************
 * General helpers and utilities.
 ******************************************************************************/

dcutils_ret_t
dcutils_uint8_array_copy(
  dcutils_uint8_array_t * const dst,
  const dcutils_uint8_array_t * const src);

/******************************************************************************
 * Type helpers
 ******************************************************************************/
std::string
dal_connextdds_create_type_name(
  const message_type_support_callbacks_t * callbacks,
  const bool mangle_names = true);

std::string
dal_connextdds_create_type_name(
  const dalidl_typesupport_introspection_cpp::MessageMembers * const members,
  const bool mangle_names = true);

std::string
dal_connextdds_create_type_name(
  const dalidl_typesupport_introspection_c__MessageMembers * const members,
  const bool mangle_names = true);

/******************************************************************************
 * Topic Helpers
 ******************************************************************************/
// std::string
// dal_connextdds_create_topic_name(
//   const char * prefix,
//   const char * topic_name,
//   const char * suffix,
//   bool avoid_ros_namespace_conventions);

// std::string
// dal_connextdds_create_topic_name(
//   const char * prefix,
//   const char * topic_name,
//   const char * suffix,
//   const dal_qos_profile_t * qos_policies);

#endif  // DAL_CONNEXTDDS__DAL_IMPL_HPP_
